<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"      
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <h:body>
        <ui:composition template="./WEB-INF/plantillas/plantilla.xhtml">
            
            <ui:define name="content">
                <c:view>
                    <h:form rendered="#{loginManagedBean.usuario.rolId.rolId==3 || loginManagedBean.usuario.rolId.rolId==5}">
                        <h1><h:outputText value="#{msgs.userMsg}"/></h1>
                        <h:panelGrid columns="2">
                            <h:outputLabel value="#{msgs.nombre}:" for="name" />
                            <h:inputText id="name" value="#{user.nombre}" disabled="true" title="name" required="true" requiredMessage="The Name field is required."/>
                            <h:outputLabel value="#{msgs.apellidos}:" for="surname" />
                            <h:inputText id="surname" value="#{user.apellidos}" disabled="true" title="Surname" required="true" requiredMessage="The Surname field is required."/>
                            <h:outputLabel value="#{msgs.dire}:" for="direccion" />
                            <h:inputText id="direccion" value="#{user.direccion}" disabled="true" title="direccion" required="true" requiredMessage="The direccion field is required."/>
                            <h:outputLabel value="#{msgs.cp}" for="cp" />
                            <h:inputText id="cp" value="#{user.cp}" disabled="true" title="cp" required="true" requiredMessage="The cp field is required."/>
                            <h:outputLabel value="#{msgs.tlfo}" for="telefono" />
                            <h:inputText id="telefono" value="#{user.telefono}" disabled="true" title="telefono" required="true" requiredMessage="The telefono field is required."/>
                            <h:outputLabel value="#{msgs.localidad}" for="localidad" />
                            <h:inputText id="localidad" value="#{user.localidad}" disabled="true" title="localidad" required="true" requiredMessage="The localidad field is required."/>
                            <h:outputLabel value="#{msgs.provincia}" for="provincia" />
                            <h:inputText id="provincia" value="#{user.provincia}" disabled="true" title="provincia" required="true" requiredMessage="The provincia field is required."/>
                            <h:outputLabel value="Rol" for="roles" />
                            <h:selectOneListbox value="#{user.rolId.descripcion}" id="rol" required="true">
                                <c:selectItems value="#{signupManagedBean.listaRoles}"/>
                            </h:selectOneListbox>
                            <h:outputLabel value="Email:" for="email" />
                            <h:inputText id="email" value="#{user.email}" disabled="true" title="Email" required="true" requiredMessage="The Email field is required."/>
<!--                            <h:outputLabel value="#{msgs.pass}:" for="password" />
                            <h:inputSecret id="password" value="#{user.password}" title="Password" requiredMessage="The Password field is required."/>
                            <h:outputLabel value="Re#{msgs.pass}:" for="repassword" />
                            <h:inputSecret id="repassword" value="#{signupManagedBean.repassword}" title="RePassword" requiredMessage="The RePassword field is required."/>-->

                            <h:commandButton value="#{msgs.editar}" action="#{signupManagedBean.editOtherProfile}" />
                            <h:commandLink value="#{msgs.elimPerfil}" action="#{signupManagedBean.deleteUsuario}" />
                            <h:button value="#{msgs.cancelar}" outcome="index" />
                        </h:panelGrid>
                    </h:form>
                </c:view>
            </ui:define>

        </ui:composition>
    </h:body>
</html>
